package com.foftact.etf;

import com.alibaba.fastjson2.annotation.JSONField;
import java.io.Serializable;
import java.util.List;

/**
 * ETF基金行情响应DTO类
 * 用于接收API返回的完整数据结构
 */
public class ETFListResponseDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    private Integer rc; // 响应代码，0表示成功
    private Integer rt; // 响应时间
    private Long svr;   // 服务器标识
    private Integer lt; // 耗时
    private Integer full; // 是否完整
    private String dlmkts; // 市场标识
    private DataDTO data;  // 数据部分

    // getter和setter方法
    public Integer getRc() {
        return rc;
    }

    public void setRc(Integer rc) {
        this.rc = rc;
    }

    public Integer getRt() {
        return rt;
    }

    public void setRt(Integer rt) {
        this.rt = rt;
    }

    public Long getSvr() {
        return svr;
    }

    public void setSvr(Long svr) {
        this.svr = svr;
    }

    public Integer getLt() {
        return lt;
    }

    public void setLt(Integer lt) {
        this.lt = lt;
    }

    public Integer getFull() {
        return full;
    }

    public void setFull(Integer full) {
        this.full = full;
    }

    public String getDlmkts() {
        return dlmkts;
    }

    public void setDlmkts(String dlmkts) {
        this.dlmkts = dlmkts;
    }

    public DataDTO getData() {
        return data;
    }

    public void setData(DataDTO data) {
        this.data = data;
    }

    /**
     * 数据内部类
     */
    public static class DataDTO implements Serializable {
        private static final long serialVersionUID = 1L;

        private Integer total; // 总条数
        private List<ETFListDTO> diff; // ETF列表数据

        // getter和setter方法
        public Integer getTotal() {
            return total;
        }

        public void setTotal(Integer total) {
            this.total = total;
        }

        public List<ETFListDTO> getDiff() {
            return diff;
        }

        public void setDiff(List<ETFListDTO> diff) {
            this.diff = diff;
        }

        @Override
        public String toString() {
            return "DataDTO{" +
                    "total=" + total +
                    ", diff=" + diff +
                    '}';
        }
    }

    @Override
    public String toString() {
        return "ETFListResponseDTO{" +
                "rc=" + rc +
                ", rt=" + rt +
                ", svr=" + svr +
                ", lt=" + lt +
                ", full=" + full +
                ", dlmkts='" + dlmkts + '\'' +
                ", data=" + data +
                '}';
    }
}